package com.ruoyi.OutboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.OutboundManagement.mapper.TransferOutboundMapper;
import com.ruoyi.OutboundManagement.domain.TransferOutbound;
import com.ruoyi.OutboundManagement.service.ITransferOutboundService;

/**
 * 调拨出库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-04
 */
@Service
public class TransferOutboundServiceImpl implements ITransferOutboundService 
{
    @Autowired
    private TransferOutboundMapper transferOutboundMapper;

    /**
     * 查询调拨出库管理
     * 
     * @param transferId 调拨出库管理主键
     * @return 调拨出库管理
     */
    @Override
    public TransferOutbound selectTransferOutboundByTransferId(Long transferId)
    {
        return transferOutboundMapper.selectTransferOutboundByTransferId(transferId);
    }

    /**
     * 查询调拨出库管理列表
     * 
     * @param transferOutbound 调拨出库管理
     * @return 调拨出库管理
     */
    @Override
    public List<TransferOutbound> selectTransferOutboundList(TransferOutbound transferOutbound)
    {
        return transferOutboundMapper.selectTransferOutboundList(transferOutbound);
    }

    /**
     * 新增调拨出库管理
     * 
     * @param transferOutbound 调拨出库管理
     * @return 结果
     */
    @Override
    public int insertTransferOutbound(TransferOutbound transferOutbound)
    {
        transferOutbound.setCreatedAt(new Date());
        return transferOutboundMapper.insertTransferOutbound(transferOutbound);
    }

    /**
     * 修改调拨出库管理
     * 
     * @param transferOutbound 调拨出库管理
     * @return 结果
     */
    @Override
    public int updateTransferOutbound(TransferOutbound transferOutbound)
    {
        return transferOutboundMapper.updateTransferOutbound(transferOutbound);
    }

    /**
     * 批量删除调拨出库管理
     * 
     * @param transferIds 需要删除的调拨出库管理主键
     * @return 结果
     */
    @Override
    public int deleteTransferOutboundByTransferIds(Long[] transferIds)
    {
        return transferOutboundMapper.deleteTransferOutboundByTransferIds(transferIds);
    }

    /**
     * 删除调拨出库管理信息
     * 
     * @param transferId 调拨出库管理主键
     * @return 结果
     */
    @Override
    public int deleteTransferOutboundByTransferId(Long transferId)
    {
        return transferOutboundMapper.deleteTransferOutboundByTransferId(transferId);
    }
}
